package cn.itsource.hrm.client;

import cn.itsource.hrm.util.AjaxResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@FeignClient(value = "hrm-common",fallbackFactory = RedisClientFallbackFactory.class)
@RequestMapping("/redis")
public interface RedisClient {
    //添加 key value expire
    @PostMapping
    AjaxResult add(@RequestBody Map<String,Object> params);
    //获取
    @GetMapping
     String get(@RequestParam(name = "key",required = true) String key);
    //删除
    @DeleteMapping
    AjaxResult del(@RequestParam(name = "key",required = true) String key);
}
